<?php

namespace App\Containers\AppSection\Qualification\Actions;

use App\Containers\AppSection\Qualification\Tasks\GetAllQualificationsTask;
use App\Ship\Parents\Actions\Action;
use App\Ship\Parents\Requests\Request;

class GetModeratorQualificationsAction extends Action
{
    public function run(Request $request)
    {

        return app(GetAllQualificationsTask::class)
            ->addRequestCriteria()
            ->withProfileStatus('qualification_checking')
            ->filterByDate($request->getInputByKey('from'), $request->getInputByKey('to'))
            ->withStage('moderator')
            ->active()
            ->run();
    }
}
